cmake_minimum_required ( VERSION 3.17 )

IF (POLICY CMP0135)
	CMAKE_POLICY ( SET CMP0135 NEW )
ENDIF ()

project ( galera-prebuild NONE )

include ( ExternalProject )
ExternalProject_Add ( galera_populate
		URL ${GALERA_PLACE}
		URL_MD5 ${GALERA_SRC_MD5}
		CMAKE_CACHE_ARGS -DWSREP_PATH:STRING=${WSREP_PATH} -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo -DGALERA_REV:STRING=${GALERA_REV}
		BUILD_COMMAND "${CMAKE_COMMAND}" --build . --config RelWithDebInfo
		INSTALL_COMMAND "${CMAKE_COMMAND}" --install . --config RelWithDebInfo --prefix "${GALERA_BUILD}"
		)

# file configured from cmake/galera-imported.cmake.in